home *** CD-ROM | disk | FTP | other *** search
/ IRIX Patches 1995 June / SGI IRIX Patches 1995 Jun.iso / os.version < prev    next >
Text File  |  1995-06-12  |  1KB  |  42 lines

  1. #!/bin/sh
  2. #
  3. # Get the OS version number from the eoe1 software image
  4. # All IRIX systems must have eoe1.sw.unix installed.
  5. #
  6. vnum=`/usr/sbin/versions -n eoe1.sw.unix | /usr/bin/tail -1 | /usr/bin/awk '{print $3}'`
  7. hostname=`/usr/bsd/hostname`
  8.  
  9. OS52="IRIX 5.2"
  10. OS53="IRIX 5.3"
  11. OS601="IRIX 6.0.1"
  12.  
  13. # Parse the version number
  14. case $vnum in
  15.     # IRIX 5.2
  16.     1011009700) os="$OS52";;
  17.     # IRIX 5.2 for Onyx Extreme
  18.     1011168200) os="$OS52 for Onyx Extreme";;
  19.     # IRIX 5.2 for Indy R4600PC & Challenge S
  20.     1011112900) os="$OS52 for Indy R4600PC & Challenge S";;
  21.     # IRIX 5.2 for Indy R4600SC/XZ & Presenter
  22.     1011372420) os="$OS52 for Indy R4600SC/XZ & Presenter";;
  23.     # IRIX 5.2 for TKO Onyx
  24.     1011410520) os="$OS52 for TKO Onyx";;
  25.     # IRIX 5.2-200MHz Challenge and Onyx
  26.     1011538120) os="$OS52 for Challenge/Onyx";;
  27.     # IRIX 5.3
  28.     1021572036) os="$OS53";;
  29.     # IRIX 5.3 for Indy R4400 175Mhz
  30.     1021835920) os="$OS53 for Indy R4400 175Mhz";;
  31.     # IRIX 5.3 with XFS
  32.     1021725920) os="$OS53 with XFS";;
  33.     # IRIX 6.0.1
  34.     1121688834) os="$OS601";;
  35.     # IRIX 6.0.1 with XFS
  36.     1121948034) os="$OS601 with XFS 2.0";;
  37.     # Some other version number
  38.     *) /bin/echo "\n${hostname} is not at a version of IRIX that this script recognizes.\n";exit 1;;
  39. esac
  40.  
  41. /bin/echo "\n${hostname} is currently running ${os}.\n"
  42.